package com.weiqiao.api.repository.impl;


import com.weiqiao.api.repository.IBankApiRepository;
import com.weiqiao.base.dao.impl.BaseMongoDaoImpl;
import org.bson.Document;
import org.bson.conversions.Bson;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("BankApiRespositoryImpl")
public class BankApiRespositoryImpl extends BaseMongoDaoImpl implements IBankApiRepository {

    private final static String collectionName = "bank_";

    @Override
    public List<String> hotBankList(Bson filter, Document sort, int skip, int limit, int company_id) {
        return super.findFilterSortSkipLimit(collectionName + company_id, filter, sort, skip, limit);
    }

    @Override
    public String hotBankDetail(int company_id, Bson filter) {
        return super.findOne(collectionName + company_id, filter);
    }

}
